package com.yanqu.road.entity.activity.diggold.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.activity.diggold.entity.DigGoldBlockData;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@FieldTypeAnnotation(tableName = "t_u_dig_gold_user_data",desc = "龙脉摸金玩家数据")
public class DigGoldUserData extends DataObject {
    @FieldTypeAnnotation(desc = "活动id",select = true,update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "用户id",select = true,update = true)
    private long userId;
    @FieldTypeAnnotation(desc = "玩家的第一行在地图的第几列")
    private int inCol;
    @FieldTypeAnnotation(desc = "当前地图所有方块")
    private List<DigGoldBlockData> blockDataList;
    @FieldTypeAnnotation(desc = "当前地图的地宫宝箱")
    private Map<Integer,List<Integer>> boxList;
    @FieldTypeAnnotation(desc = "当前生成到的地图下标")
    private int mapIndex;
    @FieldTypeAnnotation(desc = "古董拥有数量")
    private Map<Integer,Integer> antiqueNumMap;
    @FieldTypeAnnotation(desc = "本次活动积分")
    private long score;
    @FieldTypeAnnotation(desc = "本次活动古董积分")
    private long antiqueScore;
    @FieldTypeAnnotation(desc = "地宫保底")
    private int noPalaceTime;
    @FieldTypeAnnotation(desc = "土层更换地图id")
    private Map<Integer,Integer> stratumIndexMap ;




    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public int getInCol() {
        return inCol;
    }
    public void setInCol(int inCol) {
        if (this.inCol != inCol) {
            this.inCol = inCol;
            setOp(DataStatus.Update);
        }
    }

    public java.util.List<com.yanqu.road.entity.activity.diggold.entity.DigGoldBlockData> getBlockDataList() {
        return blockDataList;
    }
    public void setBlockDataList(java.util.List<com.yanqu.road.entity.activity.diggold.entity.DigGoldBlockData> blockDataList) {
        if (null == blockDataList){
            return;
        }
        if (this.blockDataList == null || !this.blockDataList.equals(blockDataList)) {
            this.blockDataList = blockDataList;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Integer, java.util.List<java.lang.Integer>> getBoxList() {
        return boxList;
    }
    public void setBoxList(java.util.Map<java.lang.Integer, java.util.List<java.lang.Integer>> boxList) {
        if (null == boxList){
            return;
        }
        if (this.boxList == null || !this.boxList.equals(boxList)) {
            this.boxList = boxList;
            setOp(DataStatus.Update);
        }
    }

    public int getMapIndex() {
        return mapIndex;
    }
    public void setMapIndex(int mapIndex) {
        if (this.mapIndex != mapIndex) {
            this.mapIndex = mapIndex;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Integer, java.lang.Integer> getAntiqueNumMap() {
        return antiqueNumMap;
    }
    public void setAntiqueNumMap(java.util.Map<java.lang.Integer, java.lang.Integer> antiqueNumMap) {
        if (null == antiqueNumMap){
            return;
        }
        if (this.antiqueNumMap == null || !this.antiqueNumMap.equals(antiqueNumMap)) {
            this.antiqueNumMap = antiqueNumMap;
            setOp(DataStatus.Update);
        }
    }

    public long getScore() {
        return score;
    }
    public void setScore(long score) {
        if (this.score != score) {
            this.score = score;
            setOp(DataStatus.Update);
        }
    }

    public long getAntiqueScore() {
        return antiqueScore;
    }

    public void setAntiqueScore(long antiqueScore) {
        if (this.antiqueScore != antiqueScore) {
            this.antiqueScore = antiqueScore;
            setOp(DataStatus.Update);
        }
    }

    public int getNoPalaceTime() {
        return noPalaceTime;
    }

    public void setNoPalaceTime(int noPalaceTime) {
        if (this.noPalaceTime != noPalaceTime) {
            this.noPalaceTime = noPalaceTime;
            setOp(DataStatus.Update);
        }
    }

    public Map<Integer, Integer> getStratumIndexMap() {
        return stratumIndexMap;
    }

    public void changeStratumIndexMap(int stratumId,int index) {
        if (null == stratumIndexMap){
            stratumIndexMap = new ConcurrentHashMap<>();
        }
        stratumIndexMap.put(stratumId,index);
        setOp(DataStatus.Update);
    }

    public void setStratumIndexMap(Map<Integer, Integer> stratumIndexMap) {
        if (null == stratumIndexMap){
            return;
        }
        if (this.stratumIndexMap == null || !this.stratumIndexMap.equals(stratumIndexMap)) {
            this.stratumIndexMap = stratumIndexMap;
            setOp(DataStatus.Update);
        }
    }
}
